home *** CD-ROM | disk | FTP | other *** search
/ The Fatted Calf / The Fatted Calf.iso / Applications / Scheduling / Cassandra / Source / Cassandra.h < prev    next >
Encoding:
Text File  |  1991-12-20  |  3.7 KB  |  133 lines

  1. //
  2. // Cassandra.h
  3. // Copyright (c) 1988, 1989, 1990 by Jiro Nakamura 
  4. // All rights reserved
  5. //
  6. // Interface definition for class Cassandra.
  7. // Cassandra is the head manager. It takes calls from the Workspace Manager
  8. // such as Hide App, etc. and passes them down to the other classes that
  9. // need them (such as Overview, etc.). It also manages the alarm sounding
  10. // and panel raising routine.
  11. //
  12. // Comments on Methods are in the source file Cassandra.m
  13. //
  14. // RCS Information
  15. // Revision Number->    $Revision: 2.11 $
  16. // Last Revised->     $Date: 91/12/20 15:36:10 $
  17. //
  18.  
  19. #import <appkit/Application.h>
  20. #import <dpsclient/dpsclient.h>  // For DPSTimedEntry, used below
  21. #import <soundkit/Sound.h>
  22. #import "Calculator.h"
  23. #import <time.h>
  24. #import "Clock.h"
  25. #import    "Event.h"
  26.  
  27. @interface Cassandra:Application
  28. {
  29.     char     lockFile[128];            // Lockfile
  30.     BOOL     alarmFree,             // Tells if the alarm
  31.                         // is free or not
  32.         queueModified,            // Does the queue need
  33.                         // Updating?
  34.         saveScreen;            // Do we need to screen save?
  35.         
  36.                         
  37.     EFileLink    snooze;            // The record number of the
  38.                         // Snoozing event    
  39.                         
  40.     float     oldVolumeLeft, oldVolumeRight;    // Previous volume levels
  41.     
  42.     double     secondsUntilEvent;        // Seconds until the next
  43.                         // event
  44.                         
  45.     struct     tm now;                // The time right now
  46.     
  47.     Sound     *soundfile;            // Our alarm sound
  48.     
  49.     DPSTimedEntry    alarmTE;           // The alarm timed entry
  50.     
  51.     // These are set by IB
  52.     
  53.     id    eventLog;            // Other classes
  54.     id    global;
  55.     id    notepad;
  56.     id    overview;
  57.     id    today;
  58.     id    week;
  59.  
  60.     id    addEventPanel;            // UI objects
  61.     id    clockView;
  62.     id    editEventPanel;
  63.     
  64.     Panel            *infoPanel;
  65.     Panel            *helpPanel;
  66.     Calculator *calculatorWindow;
  67.     
  68.     
  69.     id    alarmPanel;
  70.     id    alarmPanelTime;
  71.         id    alarmPanelMessage;
  72.     id    alarmPanelNextEvent;
  73.     id    snoozeButton;
  74.     id    okButton;
  75. }
  76.  
  77. // See Cassandra.m for descriptions of what these methods 
  78. // actually do.
  79.  
  80. + new;
  81. - appDidInit:    app;            // Sent by WM. We have initialized
  82. - appDidHide;                // Sent by WM. We have hidden
  83. - appDidUnhide;                // Sent by WM. We have unhidden
  84. - appPowerOffIn: (int) ms         // Sent by WM. We are powering off
  85.     andSave: (int)aFlag;        // or logging off
  86.     
  87. - cassandraWillQuit:    sender;        // Cassandra about to quit.
  88.                     // Save window positions and unlink
  89.                     // lockFile
  90.  
  91. - info:    sender;                // Main menu->Info Bring up info panel
  92. - help:    sender;                // Main menu->help Bring up help panel
  93. - calculator: sender;            // Bring up calculator
  94.  
  95. - quit:    sender;                // Main menu->quit
  96. - closeKeyWindow:    sender;        // Main menu->window->close
  97. - saveKeyWindow:    sender;        // Main menu->window->save
  98. - miniaturizeKeyWindow: sender;        // Main menu->window->miniaturize
  99.  
  100. - runPageLayout: sender;
  101. - print: sender;
  102.  
  103. - resetCancel:    sender;            // Main menu->modify event->reset event
  104.  
  105. - queueDidChange:    sender;        // The queue has changed. Alert
  106.                     // other objects
  107. - defaultsDidChange:    sender;        // The defaults have changed
  108.                     // alert other objects
  109. - updateClockViewMessage: sender;    // Update the clockView message 
  110.                     // from  the queue
  111.  
  112. - tick:     sender;            // Message from analog clock
  113.                     // everytime it ticks
  114.                     
  115. - screenDimmed: sender;            // Our screen has dimmed
  116. - screenUndimmed: sender;        // Our screen has undimmed
  117.                     
  118. - alarmStart:    sender;            // Start up the alarm
  119. - playAlarm:     (char *) alarmSound;    // play alarm sound
  120. - alarmSnooze:    sender;            // Hit snooze
  121. - alarmStop:    sender;            // Stop the alarm
  122. - alarmReset:    sender;            // Reset it for the next event
  123. - nextSnoozeAlarm;            // Find the next alarm time while
  124.                     // handling snoozes
  125. - timerUpdate:    sender;            // Set up the alarm timer
  126. - didPlay:    sender;            // The alarm has played
  127. - hadError:    sender;            // Error in playing alarm
  128. - startAlarmTimedEntry:    (double)fireWhen;    // Start alarmTimer
  129. - stopAlarmTimedEntry;            // Stop the timer
  130.  
  131. - global;        // returns global object
  132. @end
  133.